Deprecated: mysql_connect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in /storage/content/49/145849/famitracker.com/public_html/forum/classes/dbHandler.php on line 29 FamiTracker
Login:
Menu:
Post: Author:
FamiTracker > General > Bug Reports & Feature Requests > Shorthand for repeated values in sequences Owner: jfbillingsley New post
Page 1 of 1 Sort:  
Shorthand for repeated values in sequences Posted: 2015-02-07 09:12  (Last Edited: 2015-02-07 09:13) Reply | Quote
jfbillingsley

Avatar

Member for: 2770 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?

Posted: 2015-02-07 10:27 Reply | Quote
Roflo

Avatar

Member for: 2973 days
Location: Germany
Status: Offline

#65475
Why not use the mouse to change the bars?

Posted: 2015-02-07 11:09 Reply | Quote
jfbillingsley

Avatar

Member for: 2770 days
Status: Offline

#65476
It's inaccurate and fiddly, especially for envelopes with lots of vertical steps like arp/pitch. :T

Posted: 2015-02-07 14:10 Reply | Quote
Stratelier



Member for: 2954 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: [url=http://youtube.com/user/stratelier]http://youtube.com/user/stratelier
DeviantArt: [url=http://stratadrake.deviantart.com/]http://stratadrake.deviantart.com/
Posted: 2015-02-07 22:33  (Last Edited: 2015-02-07 22:39) Reply | Quote
cak

Avatar

Member for: 4314 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.

_______________________
[url=http://2a03.free.fr/?p=pub&dir=cak]Famicom tunes
Posted: 2015-02-07 22:56 Reply | Quote
jfbillingsley

Avatar

Member for: 2770 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

Avatar

Member for: 4180 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

Posted: 2015-02-09 01:54 Reply | Quote
Stratelier



Member for: 2954 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 [i]value[/i]([i]repeat[/i]), 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: [url=http://youtube.com/user/stratelier]http://youtube.com/user/stratelier
DeviantArt: [url=http://stratadrake.deviantart.com/]http://stratadrake.deviantart.com/
Posted: 2015-02-15 19:43 Reply | Quote
jsr
Administrator

Avatar

Member for: 5925 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
Posted: 2015-02-15 21:05 Reply | Quote
jfbillingsley

Avatar

Member for: 2770 days
Status: Offline

#65837
Where X:Y means Y copies of X? I'd be down for that.

Posted: 2015-04-05 22:35 Reply | Quote
Dullstar



Member for: 3265 days
Status: Offline

#67872
[quote=Xyz_39808]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[/quote]

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)[/quote]

Posted: 2015-04-06 04:21 Reply | Quote
poodlecock

Avatar

Member for: 3399 days
Location: !wow
Status: Offline

#67884
[quote=Xyz_39808]Though you should be able to use (& credit) code from Hertzdevil's fork for the already implemented {4'6} type of strings[/quote]
^ This 100%

Page 1 of 1 Sort: