Playing NOTES tracks simultaneously?

Post Reply
Henko
Posts: 814
Joined: Tue Apr 09, 2013 12:23 pm
My devices: iPhone,iPad
Windows
Location: Groningen, Netherlands
Flag: Netherlands

Playing NOTES tracks simultaneously?

Post 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

User avatar
Mr. Kibernetik
Site Admin
Posts: 4786
Joined: Mon Nov 19, 2012 10:16 pm
My devices: iPhone, iPad, MacBook
Location: Russia
Flag: Russia

Re: Playing NOTES tracks simultaneously?

Post 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.

Henko
Posts: 814
Joined: Tue Apr 09, 2013 12:23 pm
My devices: iPhone,iPad
Windows
Location: Groningen, Netherlands
Flag: Netherlands

Re: Playing NOTES tracks simultaneously?

Post 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?

User avatar
Mr. Kibernetik
Site Admin
Posts: 4786
Joined: Mon Nov 19, 2012 10:16 pm
My devices: iPhone, iPad, MacBook
Location: Russia
Flag: Russia

Re: Playing NOTES tracks simultaneously?

Post 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.

Henko
Posts: 814
Joined: Tue Apr 09, 2013 12:23 pm
My devices: iPhone,iPad
Windows
Location: Groningen, Netherlands
Flag: Netherlands

Re: Playing NOTES tracks simultaneously?

Post 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?

User avatar
Mr. Kibernetik
Site Admin
Posts: 4786
Joined: Mon Nov 19, 2012 10:16 pm
My devices: iPhone, iPad, MacBook
Location: Russia
Flag: Russia

Re: Playing NOTES tracks simultaneously?

Post by Mr. Kibernetik »

Because comma has no meaning in a notes string.

Post Reply