kisrael Posted August 17, 2005 Share Posted August 17, 2005 I'm not sure exactly what the code should be, but it would be cool if there was a way to talk about the length of a data set (this can be determined at compile time) Right now I have something like if musicNotePointer > 11 then musicNotePointer = 0 : rem 11 notes in all! data musicPitch 6,7,8,9,10,11,12,13,14,15,-1 end but if I could say something like if musicNotePointer > musicPitch.length then musicNotePointer = 0 data musicPitch 6,7,8,9,10,11,12,13,14,15,-1 end of XXX.length could be XXX.datalength or datalength(XXX) -- whatever is easy to parse. This would be nice, because then when the data changed, you wouldn't have to keep track of its length seperately as a kind of arbitray "magic number" I know this is one of those features that might be surprisingly irritating to code, but it would be nice. Quote Link to comment Share on other sites More sharing options...
kisrael Posted August 17, 2005 Author Share Posted August 17, 2005 Also, it would be GREAT if you could write data foo 1,1,1, 2,2,2 end instead of just data foo 1,1,1 2,2,2 end not being able to put in that comma stumped me for a bit! Quote Link to comment Share on other sites More sharing options...
potatohead Posted August 17, 2005 Share Posted August 17, 2005 I'll second that feature. Would come in handy. However, I must point out the information you need can be encoded into the data itself too. A bitmask can be used to make use of the unused bits in the pitch values, making the 'end of data byte' unneeded. Takes a bit longer (coupla cycles), but end result is about the same. Set the high bit for the last note and it lets the playloop know to reset the notepointer... Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.