Shorthand for repeated values in sequences Posted: 2015-02-07 09:12 (Last Edited: 2015-02-07 09:13 )
Reply |
Quote
jfbillingsley
Member for: 4179 days Status: Offline
#65472
Sorry if this has been suggested before, the forum search is... not very advanced.
I find that I'm constantly writing instrument sequences that look like:
15 8 8 8 8 8 8 8 8 8 7 7 7 7 7 7 7 7 6 6 6 6 6 6 6 ....
for things like long volume decays.
It's really untenable to create/edit things like this, and for really long sequences I have to break out Sublime Text.
Instead, it'd be great if you could write something like:
15 8x8 8x7 8x6 8x5 8x4 8x3 8x2 8x1 0
Where XxY means "X copies of the value Y". Although I guess "xY" is taken for the hex value syntax now so a different character could work. X*Y or Y{X} make sense to a programmer, but...
Thoughts?
Roflo
Member for: 4382 days Location: Germany Status: Offline
#65475
Why not use the mouse to change the bars?
jfbillingsley
Member for: 4179 days Status: Offline
#65476
It's inaccurate and fiddly, especially for envelopes with lots of vertical steps like arp/pitch. :T
Stratelier
Member for: 4363 days Status: Offline
#65477
Or sequences with many horizontal steps (e.g. long length), where the bars themselves are very thin and become difficult to accurately click on.
One version I've thought of in my head is using just a period/ellipses to represent "repeat the previous value". So something like "3 3 3 3 3 2 2 2 1 0" could be shortened to "3.... 2 1 0" (number of dots in direct proportion to repetition), it looks nice and intuitive but it does have the limitation of saving only 1 character per rep.
_______________________
Where to find me:
YouTube: http://youtube.com/user/stratelier
DeviantArt: http://stratadrake.deviantart.com/
Posted: 2015-02-07 22:33 (Last Edited: 2015-02-07 22:39 )
Reply |
Quote
cak
Member for: 5723 days Location: oregon Status: Offline
#65480
A little more complex, but what about typing the first value, then holding Shift and typing the second value? Then the macro window automagically repeats the first value according to what the second value is? Maybe the second value could be a permanent setting until either it's changed or until the instrument dialog is closed?
However it does seem like copy/paste works well enough in situations like this.
_______________________
Famicom tunes
jfbillingsley
Member for: 4179 days Status: Offline
#65482
The problem with that is the same as the way it is now: all you see is a small text input filled with multiple copies of the same number. Having a shorthand syntax lets you see the envelope at a glance.
"Copy and paste works well enough" stops being useful when you have envelopes like 1 1 1 1 1 1 1 1 1 1 2 2 2 2 2 2 2 2 2 2 3 3 3 3 3 4 4 4 4 4 5 5 5 5 5 6 6 6 6 6 7 7 7 7 7 8 8 8 8 8 9 9 9 9 9 10 10 10 10 10 11 11 11 11 11 12 12 12 12 12 13 13 13 13 13 14 14 14 14 14 15 15 15 15 15 15 15 15 15 15 14 14 14 14 14 14 14 14 14 14 13 13 13 13 13 13 13 13 13 13 12 12 12 12 12 12 12 12 12 12 11 11 11 11 11 11 11 11 11 11 10 10 10 10 10 10 10 10 10 10 9 9 9 9 9 9 9 9 9 9 8 8 8 8 8 8 8 8 8 8 7 7 7 7 7 7 7 7 7 7 6 6 6 6 6 6 6 6 6 6 5 5 5 5 5 5 5 5 5 5 4 4 4 4 4 4 4 4 4 4 3 3 3 3 3 3 3 3 3 3 2 2 2 2 2 2 2 2 2 2 1 1 1 1 1 1 1 1 1 1 0
Posted: 2015-02-09 01:30 (Last Edited: 2015-02-09 01:31 )
Reply |
Quote
Xyz_39808
Member for: 5589 days Location: South Texas Status: Offline
#65538
XPMCK mml strings for volumes has some elegant solutions.
{7'4 10'3} becomes {7 7 7 7 10 10 10}
{1:5} becomes {1 2 3 4 5}
{1:5:1} is the same as above.
{1:5:2} becomes {1 3 5} (increments by 2)
{1:5:0.25} becomes {1 1 1 1 2 2 2 2 3 3 3 3 4 4 4 4 5}
{10:4:-2} becomes {10 8 6 4} (incrementing down requires a negative sign, "10:4:2" would break the compiler)
Though fractional 3rd parameters using a decimal point totally break when using hex.
There is also MGSDRV style.
{5:3 4} becomes {5 5 5 4}
{2 10=5} becomes {2 4 6 8 10} (took 5 steps to get to 10)
{6 10=9} becomes {6 6 7 7 8 8 9 9 10} (took 9 steps to get to 10)
Maybe a forum vote for which convention is neater?
Though you should be able to use (& credit) code from Hertzdevil's fork for the already implemented {4'6} type of strings
Stratelier
Member for: 4363 days Status: Offline
#65544
I don't like the apostrophe versions, personally, since then I start thinking of them as units of measure (namely feet/inches).
Another potentially simple solution is just value (repeat ), i.e. 5(3) = 5 5 5
Multiplication sign is more or less out, of course, since that could get confused with hexadecimal input.
_______________________
Where to find me:
YouTube: http://youtube.com/user/stratelier
DeviantArt: http://stratadrake.deviantart.com/
jsr
Administrator
Member for: 7334 days Location: Sweden Status: Offline
#65835
I see there are a few different ideas on how to do this, if you can agree on one way then I'll add that.
Personally I think the x:y style looks good.
_______________________
Programmer and developer
jfbillingsley
Member for: 4179 days Status: Offline
#65837
Where X:Y means Y copies of X? I'd be down for that.
Dullstar
Member for: 4674 days Status: Offline
#67872
Xyz_39808 wrote:
XPMCK mml strings for volumes has some elegant solutions.
{7'4 10'3} becomes {7 7 7 7 10 10 10}
{1:5} becomes {1 2 3 4 5}
{1:5:1} is the same as above.
{1:5:2} becomes {1 3 5} (increments by 2)
{1:5:0.25} becomes {1 1 1 1 2 2 2 2 3 3 3 3 4 4 4 4 5}
{10:4:-2} becomes {10 8 6 4} (incrementing down requires a negative sign, "10:4:2" would break the compiler)
Though fractional 3rd parameters using a decimal point totally break when using hex.
There is also MGSDRV style.
{5:3 4} becomes {5 5 5 4}
{2 10=5} becomes {2 4 6 8 10} (took 5 steps to get to 10)
{6 10=9} becomes {6 6 7 7 8 8 9 9 10} (took 9 steps to get to 10)
Maybe a forum vote for which convention is neater?
Though you should be able to use (& credit) code from Hertzdevil's fork for the already implemented {4'6} type of strings
I could see either of these two options being extremely useful, especially
Quote:
{1:5} becomes {1 2 3 4 5}
{1:5:1} is the same as above.
{1:5:2} becomes {1 3 5} (increments by 2)
{1:5:0.25} becomes {1 1 1 1 2 2 2 2 3 3 3 3 4 4 4 4 5}
{10:4:-2} becomes {10 8 6 4} (incrementing down requires a negative sign, "10:4:2" would break the compiler)
poodlecock
Member for: 4808 days Location: !wow Status: Offline
#67884
Xyz_39808 wrote:
Though you should be able to use (& credit) code from Hertzdevil's fork for the already implemented {4'6} type of strings
^ This 100%