Page 1 of 1

Playing NOTES tracks simultaneously?

Posted: Mon Oct 12, 2015 10:35 am
by Henko
Hi,
I start playing with the NOTES commands, making an endless 'music' generator. The basis for that is the code herunder.
It occurred to me, that the two tracks, defined in the notes_gen() function are played sequentially and not simultaneously as expected (because they are different channels).
Can the be forced to play simultaneously? A second question: how can channels be indicated (suppose one want to play a percussion track on channel 10)?

Code: Select all

new_song: notes set n$ ! notes play
n$=notes_gen$()
wait: if notes_time()<notes_length() then wait else new_song
end

def notes_gen$()
a$="0:ccc   ddd"",""19:we2 f"
return a$
end def

Re: Playing NOTES tracks simultaneously?

Posted: Mon Oct 12, 2015 10:41 am
by Mr. Kibernetik
Tracks are indicated in NOTES SET command - they are separated by commas.
Example with percussions (notes on the 10th track) is the last example in NOTES SET command documentation.

Re: Playing NOTES tracks simultaneously?

Posted: Mon Oct 12, 2015 12:36 pm
by Henko
Thanks for the quick response (as usual). I understand now.
One last remark:
The command NOTES SET <string constant>,<string constant> results in Playing the two tracks simultaneously.
However the command NOTES SET N$, where N$=<string constant>,<string constant> results in playing the two tracks sequentially on the same channel (as is the case in the little test program). Is that a bug?

Re: Playing NOTES tracks simultaneously?

Posted: Mon Oct 12, 2015 12:43 pm
by Mr. Kibernetik
No, why this is a bug? Notes in one track are played sequentally, this is normal behaviour.
That comma in the notes string is a bug :D but sB handles it without panic.

Re: Playing NOTES tracks simultaneously?

Posted: Mon Oct 12, 2015 4:34 pm
by Henko
Why is that comma a bug? The double quotes each mean an embedded single quote within a string, hence it is one string, and a comma is a valid caracter in a string, not?

Re: Playing NOTES tracks simultaneously?

Posted: Mon Oct 12, 2015 4:56 pm
by Mr. Kibernetik
Because comma has no meaning in a notes string.