Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.javascript > #34546 > unrolled thread
| Started by | Jonas Thörnvall <jonas.thornvall@gmail.com> |
|---|---|
| First post | 2018-01-09 06:48 -0800 |
| Last post | 2018-01-10 09:47 -0800 |
| Articles | 13 — 3 participants |
Back to article view | Back to comp.lang.javascript
Even a genius needs help once in a while, "but they seldom get any" Jonas Thörnvall <jonas.thornvall@gmail.com> - 2018-01-09 06:48 -0800
Re: Even a genius needs help once in a while, "but they seldom get any" Jonas Thörnvall <jonas.thornvall@gmail.com> - 2018-01-09 06:51 -0800
Re: Even a genius needs help once in a while, "but they seldom get any" "Christoph M. Becker" <cmbecker69@arcor.de> - 2018-01-09 16:04 +0100
Re: Even a genius needs help once in a while, "but they seldom get any" Jonas Thörnvall <jonas.thornvall@gmail.com> - 2018-01-09 07:09 -0800
Re: Even a genius needs help once in a while, "but they seldom get any" Jonas Thörnvall <jonas.thornvall@gmail.com> - 2018-01-09 07:21 -0800
Re: Even a genius needs help once in a while, "but they seldom get any" Jonas Thörnvall <jonas.thornvall@gmail.com> - 2018-01-09 07:26 -0800
Re: Even a genius needs help once in a while, "but they seldom get any" "Chris M. Thomasson" <invalid_chris_thomasson@invalid.invalid> - 2018-01-09 19:54 -0800
Re: Even a genius needs help once in a while, "but they seldom get any" Jonas Thörnvall <jonas.thornvall@gmail.com> - 2018-01-09 21:42 -0800
Re: Even a genius needs help once in a while, "but they seldom get any" Jonas Thörnvall <jonas.thornvall@gmail.com> - 2018-01-10 08:24 -0800
Re: Even a genius needs help once in a while, "but they seldom get any" Jonas Thörnvall <jonas.thornvall@gmail.com> - 2018-01-10 08:37 -0800
Re: Even a genius needs help once in a while, "but they seldom get any" Jonas Thörnvall <jonas.thornvall@gmail.com> - 2018-01-10 08:40 -0800
Re: Even a genius needs help once in a while, "but they seldom get any" Jonas Thörnvall <jonas.thornvall@gmail.com> - 2018-01-10 08:40 -0800
Re: Even a genius needs help once in a while, "but they seldom get any" Jonas Thörnvall <jonas.thornvall@gmail.com> - 2018-01-10 09:47 -0800
| From | Jonas Thörnvall <jonas.thornvall@gmail.com> |
|---|---|
| Date | 2018-01-09 06:48 -0800 |
| Subject | Even a genius needs help once in a while, "but they seldom get any" |
| Message-ID | <ad7a6b4a-1b05-4b7c-9a1f-bb814d0a3be5@googlegroups.com> |
I am pretty clueless how about how ***they*** program midi those programmers, but i built a track sequenser and now i realise that the thingys stored at the tracks need to be sorted on time basis. So it seem that track is mostly an editing feature?
Thingys are read using timebasis. Since track zero not used i was thinking downmixing the channels to it.
Can some of the more anal geniuses show me howto todo it in an elegant way. Or are you to buissy pondering over linguistic and semantic excersizes?
I suspect i have to do it ***yet again*** myself.
Well evidently track isn't of any use in the downmix.
I have started to ponder if track really necessary, but it seem like a good idea to have when building an event editor. Also this allow instrument changes on same channel and even changing outmodule even when in track.
That the midi API have omni listening on midiports is clear, i do not know if it can have multiple outports open.
track[m] ={
outport:[],
portname : [],
midichannel:[],
program:[],
time:[],
data0:[],
data1:[],
data2:[]
};
[toc] | [next] | [standalone]
| From | Jonas Thörnvall <jonas.thornvall@gmail.com> |
|---|---|
| Date | 2018-01-09 06:51 -0800 |
| Message-ID | <65c0c709-9fbd-43d2-b327-c062caa0382b@googlegroups.com> |
| In reply to | #34546 |
Den tisdag 9 januari 2018 kl. 15:48:46 UTC+1 skrev Jonas Thörnvall:
> I am pretty clueless how about how ***they*** program midi those programmers, but i built a track sequenser and now i realise that the thingys stored at the tracks need to be sorted on time basis. So it seem that track is mostly an editing feature?
>
> Thingys are read using timebasis. Since track zero not used i was thinking downmixing the channels to it.
>
> Can some of the more anal geniuses show me howto todo it in an elegant way. Or are you to buissy pondering over linguistic and semantic excersizes?
>
> I suspect i have to do it ***yet again*** myself.
> Well evidently track isn't of any use in the downmix.
> I have started to ponder if track really necessary, but it seem like a good idea to have when building an event editor. Also this allow instrument changes on same channel and even changing outmodule even when in track.
>
> That the midi API have omni listening on midiports is clear, i do not know if it can have multiple outports open.
>
> track[m] ={
> outport:[],
> portname : [],
> midichannel:[],
> program:[],
> time:[],
> data0:[],
> data1:[],
> data2:[]
> };
It is an event sort, that needs to be done.
[toc] | [prev] | [next] | [standalone]
| From | "Christoph M. Becker" <cmbecker69@arcor.de> |
|---|---|
| Date | 2018-01-09 16:04 +0100 |
| Message-ID | <p32ll2$4n5$1@solani.org> |
| In reply to | #34546 |
On 09.01.2018 at 15:48, Jonas Thörnvall wrote: > Can some of the more anal geniuses show me howto todo it in an elegant way. That is not supposed to work. Get well soon! :) *plonk* -- Christoph M. Becker
[toc] | [prev] | [next] | [standalone]
| From | Jonas Thörnvall <jonas.thornvall@gmail.com> |
|---|---|
| Date | 2018-01-09 07:09 -0800 |
| Message-ID | <7535bdfe-edd3-453d-a245-2d12a53d5fc3@googlegroups.com> |
| In reply to | #34549 |
Den tisdag 9 januari 2018 kl. 16:04:13 UTC+1 skrev Christoph M. Becker: > On 09.01.2018 at 15:48, Jonas Thörnvall wrote: > > > Can some of the more anal geniuses show me howto todo it in an elegant way. > > That is not supposed to work. Get well soon! :) > > *plonk* > > -- > Christoph M. Becker I cure myself with a colorful interface and by taking pity on the poor semantic fanatcis. https://www.facebook.com/photo.php?fbid=1512548872148264&set=a.288020821267748.63002.100001794973974&type=3&theater
[toc] | [prev] | [next] | [standalone]
| From | Jonas Thörnvall <jonas.thornvall@gmail.com> |
|---|---|
| Date | 2018-01-09 07:21 -0800 |
| Message-ID | <fae40909-d947-459c-b703-18e8e344d0f0@googlegroups.com> |
| In reply to | #34550 |
Den tisdag 9 januari 2018 kl. 16:10:00 UTC+1 skrev Jonas Thörnvall: > Den tisdag 9 januari 2018 kl. 16:04:13 UTC+1 skrev Christoph M. Becker: > > On 09.01.2018 at 15:48, Jonas Thörnvall wrote: > > > > > Can some of the more anal geniuses show me howto todo it in an elegant way. > > > > That is not supposed to work. Get well soon! :) > > > > *plonk* > > > > -- > > Christoph M. Becker > > I cure myself with a colorful interface and by taking pity on the poor semantic fanatcis. > > https://www.facebook.com/photo.php?fbid=1512548872148264&set=a.288020821267748.63002.100001794973974&type=3&theater Well i cheat a bit doing interface first, you can't set how many bars to record yet although the metronome to calculate it is there "although" not playing yet, but you can record and set program channel and outputports on a track. It get a little weird try to play the tracks though first it play track one and then rest of the events stacks in a single stroke, because they are before the event already played. So i have to downmix, "sort it out so to say"
[toc] | [prev] | [next] | [standalone]
| From | Jonas Thörnvall <jonas.thornvall@gmail.com> |
|---|---|
| Date | 2018-01-09 07:26 -0800 |
| Message-ID | <20cef75e-75dc-4b44-bcef-5eef2f49e5a8@googlegroups.com> |
| In reply to | #34549 |
Den tisdag 9 januari 2018 kl. 16:04:13 UTC+1 skrev Christoph M. Becker: > On 09.01.2018 at 15:48, Jonas Thörnvall wrote: > > > Can some of the more anal geniuses show me howto todo it in an elegant way. > > That is not supposed to work. Get well soon! :) > > *plonk* > > -- > Christoph M. Becker Flattering doesn't work i thought you guys took honor in being precise and on the mark? Maybe i was a bit sloppy i meant anal retentive that is a good quality to have as a programmer "if it comes with some intellect" LoL
[toc] | [prev] | [next] | [standalone]
| From | "Chris M. Thomasson" <invalid_chris_thomasson@invalid.invalid> |
|---|---|
| Date | 2018-01-09 19:54 -0800 |
| Message-ID | <p342or$vuc$1@dont-email.me> |
| In reply to | #34546 |
On 1/9/2018 6:48 AM, Jonas Thörnvall wrote:
> I am pretty clueless how about how ***they*** program midi those programmers, but i built a track sequenser and now i realise that the thingys stored at the tracks need to be sorted on time basis. So it seem that track is mostly an editing feature?
>
> Thingys are read using timebasis. Since track zero not used i was thinking downmixing the channels to it.
>
> Can some of the more anal geniuses show me howto todo it in an elegant way. Or are you to buissy pondering over linguistic and semantic excersizes?
>
> I suspect i have to do it ***yet again*** myself.
> Well evidently track isn't of any use in the downmix.
> I have started to ponder if track really necessary, but it seem like a good idea to have when building an event editor. Also this allow instrument changes on same channel and even changing outmodule even when in track.
>
> That the midi API have omni listening on midiports is clear, i do not know if it can have multiple outports open.
>
> track[m] ={
> outport:[],
> portname : [],
> midichannel:[],
> program:[],
> time:[],
> data0:[],
> data1:[],
> data2:[]
> };
>
https://youtu.be/kEBW8A3bw-Q
;^)
[toc] | [prev] | [next] | [standalone]
| From | Jonas Thörnvall <jonas.thornvall@gmail.com> |
|---|---|
| Date | 2018-01-09 21:42 -0800 |
| Message-ID | <7885cb69-0ec1-4526-bda4-e2141174c496@googlegroups.com> |
| In reply to | #34555 |
Den onsdag 10 januari 2018 kl. 04:54:12 UTC+1 skrev Chris M. Thomasson:
> On 1/9/2018 6:48 AM, Jonas Thörnvall wrote:
> > I am pretty clueless how about how ***they*** program midi those programmers, but i built a track sequenser and now i realise that the thingys stored at the tracks need to be sorted on time basis. So it seem that track is mostly an editing feature?
> >
> > Thingys are read using timebasis. Since track zero not used i was thinking downmixing the channels to it.
> >
> > Can some of the more anal geniuses show me howto todo it in an elegant way. Or are you to buissy pondering over linguistic and semantic excersizes?
> >
> > I suspect i have to do it ***yet again*** myself.
> > Well evidently track isn't of any use in the downmix.
> > I have started to ponder if track really necessary, but it seem like a good idea to have when building an event editor. Also this allow instrument changes on same channel and even changing outmodule even when in track.
> >
> > That the midi API have omni listening on midiports is clear, i do not know if it can have multiple outports open.
> >
> > track[m] ={
> > outport:[],
> > portname : [],
> > midichannel:[],
> > program:[],
> > time:[],
> > data0:[],
> > data1:[],
> > data2:[]
> > };
> >
>
> https://youtu.be/kEBW8A3bw-Q
>
> ;^)
Well maybe a good idea but i fear a modplayer is a much more complex ***thingy*** then something that deals with pure midisignals. You need a sound generator and god knows what to quirk out sounds, because it ain't just pure samples and midi in mods? They bend and pitch samples, then it would be better to go for a real sampler. I once invented ***the*** algorithm for none shortened/elongated piched sampleplayback i ***stretched*** the samples.
Well i just interpolated the bits in between in an rather ugly manner.
Kind of a bitwig you know.
[toc] | [prev] | [next] | [standalone]
| From | Jonas Thörnvall <jonas.thornvall@gmail.com> |
|---|---|
| Date | 2018-01-10 08:24 -0800 |
| Message-ID | <dfdab3b3-866c-4f6e-addd-58f5c7e6f371@googlegroups.com> |
| In reply to | #34556 |
Den onsdag 10 januari 2018 kl. 06:42:22 UTC+1 skrev Jonas Thörnvall:
> Den onsdag 10 januari 2018 kl. 04:54:12 UTC+1 skrev Chris M. Thomasson:
> > On 1/9/2018 6:48 AM, Jonas Thörnvall wrote:
> > > I am pretty clueless how about how ***they*** program midi those programmers, but i built a track sequenser and now i realise that the thingys stored at the tracks need to be sorted on time basis. So it seem that track is mostly an editing feature?
> > >
> > > Thingys are read using timebasis. Since track zero not used i was thinking downmixing the channels to it.
> > >
> > > Can some of the more anal geniuses show me howto todo it in an elegant way. Or are you to buissy pondering over linguistic and semantic excersizes?
> > >
> > > I suspect i have to do it ***yet again*** myself.
> > > Well evidently track isn't of any use in the downmix.
> > > I have started to ponder if track really necessary, but it seem like a good idea to have when building an event editor. Also this allow instrument changes on same channel and even changing outmodule even when in track.
> > >
> > > That the midi API have omni listening on midiports is clear, i do not know if it can have multiple outports open.
> > >
> > > track[m] ={
> > > outport:[],
> > > portname : [],
> > > midichannel:[],
> > > program:[],
> > > time:[],
> > > data0:[],
> > > data1:[],
> > > data2:[]
> > > };
> > >
> >
> > https://youtu.be/kEBW8A3bw-Q
> >
> > ;^)
>
> Well maybe a good idea but i fear a modplayer is a much more complex ***thingy*** then something that deals with pure midisignals. You need a sound generator and god knows what to quirk out sounds, because it ain't just pure samples and midi in mods? They bend and pitch samples, then it would be better to go for a real sampler. I once invented ***the*** algorithm for none shortened/elongated piched sampleplayback i ***stretched*** the samples.
>
> Well i just interpolated the bits in between in an rather ugly manner.
> Kind of a bitwig you know.
It was almost 20 years ago, and my memory is a bit rusty but basicly i used nykvist theorem to resample into the different keys i think it was the standard procedure and then i took the new pitched sample compared it with the ground keylength and got a ratio lets say 3,4 times shorter then i copied each bit using some statistic overlay 3,4 and pushed between.
And the strange thing? It worked, try it yourself. Well a single note, i don't remember which was the base note used by early sampler and pcm sounds. Do not sound perfect, but if you record/sample a tone in each octave it sounds good, those days 32MB ram, so the bitwig of samples became a memory issue. But i think they solved it by reading the sampled notes directly from disc realtime but it must caused a small latency?
Today i think you could do the resampling of a single sample into all notes and hold them within memory, even using javascript "because of the ton of memory" in modern computers. It will take a couple of seconds max to do the realtime key resampling?
Well i think Javascript is amazing in many ways, but you have started to lock up things into blip blop semantics, that is basicly unreadable without a manual.
I still trying to findout how the fuck to get the ports "promise" to load before the interface. If you would not be so fucking anal about the semantics it would be a no brainer. Now i have to reload the thing to get an error free load of the midi ports. I mean how can one put complexity in syntax of such a thing as the thing to wait for another task first to be done, before you start next?
Yeah i get that i must wait for the fucking ports to be ready before the interface can try load the values from them. But i don't get how fucking waiting for an answer of a task can be so fucking complex that i am clueless about how to check if the ports loaded, before i try to call the values within them.
How is it possible to fuck up things so bad?
[toc] | [prev] | [next] | [standalone]
| From | Jonas Thörnvall <jonas.thornvall@gmail.com> |
|---|---|
| Date | 2018-01-10 08:37 -0800 |
| Message-ID | <9624f7d0-e38a-4a46-acdd-93b089c84b32@googlegroups.com> |
| In reply to | #34558 |
Den onsdag 10 januari 2018 kl. 17:25:07 UTC+1 skrev Jonas Thörnvall:
> Den onsdag 10 januari 2018 kl. 06:42:22 UTC+1 skrev Jonas Thörnvall:
> > Den onsdag 10 januari 2018 kl. 04:54:12 UTC+1 skrev Chris M. Thomasson:
> > > On 1/9/2018 6:48 AM, Jonas Thörnvall wrote:
> > > > I am pretty clueless how about how ***they*** program midi those programmers, but i built a track sequenser and now i realise that the thingys stored at the tracks need to be sorted on time basis. So it seem that track is mostly an editing feature?
> > > >
> > > > Thingys are read using timebasis. Since track zero not used i was thinking downmixing the channels to it.
> > > >
> > > > Can some of the more anal geniuses show me howto todo it in an elegant way. Or are you to buissy pondering over linguistic and semantic excersizes?
> > > >
> > > > I suspect i have to do it ***yet again*** myself.
> > > > Well evidently track isn't of any use in the downmix.
> > > > I have started to ponder if track really necessary, but it seem like a good idea to have when building an event editor. Also this allow instrument changes on same channel and even changing outmodule even when in track.
> > > >
> > > > That the midi API have omni listening on midiports is clear, i do not know if it can have multiple outports open.
> > > >
> > > > track[m] ={
> > > > outport:[],
> > > > portname : [],
> > > > midichannel:[],
> > > > program:[],
> > > > time:[],
> > > > data0:[],
> > > > data1:[],
> > > > data2:[]
> > > > };
> > > >
> > >
> > > https://youtu.be/kEBW8A3bw-Q
> > >
> > > ;^)
> >
> > Well maybe a good idea but i fear a modplayer is a much more complex ***thingy*** then something that deals with pure midisignals. You need a sound generator and god knows what to quirk out sounds, because it ain't just pure samples and midi in mods? They bend and pitch samples, then it would be better to go for a real sampler. I once invented ***the*** algorithm for none shortened/elongated piched sampleplayback i ***stretched*** the samples.
> >
> > Well i just interpolated the bits in between in an rather ugly manner.
> > Kind of a bitwig you know.
>
> It was almost 20 years ago, and my memory is a bit rusty but basicly i used nykvist theorem to resample into the different keys i think it was the standard procedure and then i took the new pitched sample compared it with the ground keylength and got a ratio lets say 3,4 times shorter then i copied each bit using some statistic overlay 3,4 and pushed between.
>
> And the strange thing? It worked, try it yourself. Well a single note, i don't remember which was the base note used by early sampler and pcm sounds. Do not sound perfect, but if you record/sample a tone in each octave it sounds good, those days 32MB ram, so the bitwig of samples became a memory issue. But i think they solved it by reading the sampled notes directly from disc realtime but it must caused a small latency?
>
> Today i think you could do the resampling of a single sample into all notes and hold them within memory, even using javascript "because of the ton of memory" in modern computers. It will take a couple of seconds max to do the realtime key resampling?
>
> Well i think Javascript is amazing in many ways, but you have started to lock up things into blip blop semantics, that is basicly unreadable without a manual.
>
> I still trying to findout how the fuck to get the ports "promise" to load before the interface. If you would not be so fucking anal about the semantics it would be a no brainer. Now i have to reload the thing to get an error free load of the midi ports. I mean how can one put complexity in syntax of such a thing as the thing to wait for another task first to be done, before you start next?
>
> Yeah i get that i must wait for the fucking ports to be ready before the interface can try load the values from them. But i don't get how fucking waiting for an answer of a task can be so fucking complex that i am clueless about how to check if the ports loaded, before i try to call the values within them.
>
> How is it possible to fuck up things so bad?
Apparently javascript have gone from having a rather straightforward syntax, into the world of mystery. I thought javascript and script languages was created to get away from awkvard convoluted syntax.
And now the "idiot industry" slowly take over the project, and move it into the land of obscurity, it is rather sad that it moved towards that one have memorise stringed together piece of semantic nonsense bullshit, to be usable.
I think there must be more people then i that have noticed it.
https://stackoverflow.com/questions/27759593/how-do-i-wait-for-a-promise-to-finish-before-returning-the-variable-of-a-functio
[toc] | [prev] | [next] | [standalone]
| From | Jonas Thörnvall <jonas.thornvall@gmail.com> |
|---|---|
| Date | 2018-01-10 08:40 -0800 |
| Message-ID | <ecdd26eb-a33e-464a-8e69-5154210bd3f6@googlegroups.com> |
| In reply to | #34559 |
Den onsdag 10 januari 2018 kl. 17:37:45 UTC+1 skrev Jonas Thörnvall:
> Den onsdag 10 januari 2018 kl. 17:25:07 UTC+1 skrev Jonas Thörnvall:
> > Den onsdag 10 januari 2018 kl. 06:42:22 UTC+1 skrev Jonas Thörnvall:
> > > Den onsdag 10 januari 2018 kl. 04:54:12 UTC+1 skrev Chris M. Thomasson:
> > > > On 1/9/2018 6:48 AM, Jonas Thörnvall wrote:
> > > > > I am pretty clueless how about how ***they*** program midi those programmers, but i built a track sequenser and now i realise that the thingys stored at the tracks need to be sorted on time basis. So it seem that track is mostly an editing feature?
> > > > >
> > > > > Thingys are read using timebasis. Since track zero not used i was thinking downmixing the channels to it.
> > > > >
> > > > > Can some of the more anal geniuses show me howto todo it in an elegant way. Or are you to buissy pondering over linguistic and semantic excersizes?
> > > > >
> > > > > I suspect i have to do it ***yet again*** myself.
> > > > > Well evidently track isn't of any use in the downmix.
> > > > > I have started to ponder if track really necessary, but it seem like a good idea to have when building an event editor. Also this allow instrument changes on same channel and even changing outmodule even when in track.
> > > > >
> > > > > That the midi API have omni listening on midiports is clear, i do not know if it can have multiple outports open.
> > > > >
> > > > > track[m] ={
> > > > > outport:[],
> > > > > portname : [],
> > > > > midichannel:[],
> > > > > program:[],
> > > > > time:[],
> > > > > data0:[],
> > > > > data1:[],
> > > > > data2:[]
> > > > > };
> > > > >
> > > >
> > > > https://youtu.be/kEBW8A3bw-Q
> > > >
> > > > ;^)
> > >
> > > Well maybe a good idea but i fear a modplayer is a much more complex ***thingy*** then something that deals with pure midisignals. You need a sound generator and god knows what to quirk out sounds, because it ain't just pure samples and midi in mods? They bend and pitch samples, then it would be better to go for a real sampler. I once invented ***the*** algorithm for none shortened/elongated piched sampleplayback i ***stretched*** the samples.
> > >
> > > Well i just interpolated the bits in between in an rather ugly manner.
> > > Kind of a bitwig you know.
> >
> > It was almost 20 years ago, and my memory is a bit rusty but basicly i used nykvist theorem to resample into the different keys i think it was the standard procedure and then i took the new pitched sample compared it with the ground keylength and got a ratio lets say 3,4 times shorter then i copied each bit using some statistic overlay 3,4 and pushed between.
> >
> > And the strange thing? It worked, try it yourself. Well a single note, i don't remember which was the base note used by early sampler and pcm sounds. Do not sound perfect, but if you record/sample a tone in each octave it sounds good, those days 32MB ram, so the bitwig of samples became a memory issue. But i think they solved it by reading the sampled notes directly from disc realtime but it must caused a small latency?
> >
> > Today i think you could do the resampling of a single sample into all notes and hold them within memory, even using javascript "because of the ton of memory" in modern computers. It will take a couple of seconds max to do the realtime key resampling?
> >
> > Well i think Javascript is amazing in many ways, but you have started to lock up things into blip blop semantics, that is basicly unreadable without a manual.
> >
> > I still trying to findout how the fuck to get the ports "promise" to load before the interface. If you would not be so fucking anal about the semantics it would be a no brainer. Now i have to reload the thing to get an error free load of the midi ports. I mean how can one put complexity in syntax of such a thing as the thing to wait for another task first to be done, before you start next?
> >
> > Yeah i get that i must wait for the fucking ports to be ready before the interface can try load the values from them. But i don't get how fucking waiting for an answer of a task can be so fucking complex that i am clueless about how to check if the ports loaded, before i try to call the values within them.
> >
> > How is it possible to fuck up things so bad?
>
> Apparently javascript have gone from having a rather straightforward syntax, into the world of mystery. I thought javascript and script languages was created to get away from awkvard convoluted syntax.
>
> And now the "idiot industry" slowly take over the project, and move it into the land of obscurity, it is rather sad that it moved towards that one have memorise stringed together piece of semantic nonsense bullshit, to be usable.
> I think there must be more people then i that have noticed it.
>
> https://stackoverflow.com/questions/27759593/how-do-i-wait-for-a-promise-to-finish-before-returning-the-variable-of-a-functio
https://daveceddia.com/waiting-for-promises-in-a-loop/
[toc] | [prev] | [next] | [standalone]
| From | Jonas Thörnvall <jonas.thornvall@gmail.com> |
|---|---|
| Date | 2018-01-10 08:40 -0800 |
| Message-ID | <fc155584-3cb8-4bf0-8215-e2e4c936630d@googlegroups.com> |
| In reply to | #34560 |
Den onsdag 10 januari 2018 kl. 17:40:43 UTC+1 skrev Jonas Thörnvall:
> Den onsdag 10 januari 2018 kl. 17:37:45 UTC+1 skrev Jonas Thörnvall:
> > Den onsdag 10 januari 2018 kl. 17:25:07 UTC+1 skrev Jonas Thörnvall:
> > > Den onsdag 10 januari 2018 kl. 06:42:22 UTC+1 skrev Jonas Thörnvall:
> > > > Den onsdag 10 januari 2018 kl. 04:54:12 UTC+1 skrev Chris M. Thomasson:
> > > > > On 1/9/2018 6:48 AM, Jonas Thörnvall wrote:
> > > > > > I am pretty clueless how about how ***they*** program midi those programmers, but i built a track sequenser and now i realise that the thingys stored at the tracks need to be sorted on time basis. So it seem that track is mostly an editing feature?
> > > > > >
> > > > > > Thingys are read using timebasis. Since track zero not used i was thinking downmixing the channels to it.
> > > > > >
> > > > > > Can some of the more anal geniuses show me howto todo it in an elegant way. Or are you to buissy pondering over linguistic and semantic excersizes?
> > > > > >
> > > > > > I suspect i have to do it ***yet again*** myself.
> > > > > > Well evidently track isn't of any use in the downmix.
> > > > > > I have started to ponder if track really necessary, but it seem like a good idea to have when building an event editor. Also this allow instrument changes on same channel and even changing outmodule even when in track.
> > > > > >
> > > > > > That the midi API have omni listening on midiports is clear, i do not know if it can have multiple outports open.
> > > > > >
> > > > > > track[m] ={
> > > > > > outport:[],
> > > > > > portname : [],
> > > > > > midichannel:[],
> > > > > > program:[],
> > > > > > time:[],
> > > > > > data0:[],
> > > > > > data1:[],
> > > > > > data2:[]
> > > > > > };
> > > > > >
> > > > >
> > > > > https://youtu.be/kEBW8A3bw-Q
> > > > >
> > > > > ;^)
> > > >
> > > > Well maybe a good idea but i fear a modplayer is a much more complex ***thingy*** then something that deals with pure midisignals. You need a sound generator and god knows what to quirk out sounds, because it ain't just pure samples and midi in mods? They bend and pitch samples, then it would be better to go for a real sampler. I once invented ***the*** algorithm for none shortened/elongated piched sampleplayback i ***stretched*** the samples.
> > > >
> > > > Well i just interpolated the bits in between in an rather ugly manner.
> > > > Kind of a bitwig you know.
> > >
> > > It was almost 20 years ago, and my memory is a bit rusty but basicly i used nykvist theorem to resample into the different keys i think it was the standard procedure and then i took the new pitched sample compared it with the ground keylength and got a ratio lets say 3,4 times shorter then i copied each bit using some statistic overlay 3,4 and pushed between.
> > >
> > > And the strange thing? It worked, try it yourself. Well a single note, i don't remember which was the base note used by early sampler and pcm sounds. Do not sound perfect, but if you record/sample a tone in each octave it sounds good, those days 32MB ram, so the bitwig of samples became a memory issue. But i think they solved it by reading the sampled notes directly from disc realtime but it must caused a small latency?
> > >
> > > Today i think you could do the resampling of a single sample into all notes and hold them within memory, even using javascript "because of the ton of memory" in modern computers. It will take a couple of seconds max to do the realtime key resampling?
> > >
> > > Well i think Javascript is amazing in many ways, but you have started to lock up things into blip blop semantics, that is basicly unreadable without a manual.
> > >
> > > I still trying to findout how the fuck to get the ports "promise" to load before the interface. If you would not be so fucking anal about the semantics it would be a no brainer. Now i have to reload the thing to get an error free load of the midi ports. I mean how can one put complexity in syntax of such a thing as the thing to wait for another task first to be done, before you start next?
> > >
> > > Yeah i get that i must wait for the fucking ports to be ready before the interface can try load the values from them. But i don't get how fucking waiting for an answer of a task can be so fucking complex that i am clueless about how to check if the ports loaded, before i try to call the values within them.
> > >
> > > How is it possible to fuck up things so bad?
> >
> > Apparently javascript have gone from having a rather straightforward syntax, into the world of mystery. I thought javascript and script languages was created to get away from awkvard convoluted syntax.
> >
> > And now the "idiot industry" slowly take over the project, and move it into the land of obscurity, it is rather sad that it moved towards that one have memorise stringed together piece of semantic nonsense bullshit, to be usable.
> > I think there must be more people then i that have noticed it.
> >
> > https://stackoverflow.com/questions/27759593/how-do-i-wait-for-a-promise-to-finish-before-returning-the-variable-of-a-functio
>
> https://daveceddia.com/waiting-for-promises-in-a-loop/
https://github.com/petkaantonov/bluebird/issues/31
[toc] | [prev] | [next] | [standalone]
| From | Jonas Thörnvall <jonas.thornvall@gmail.com> |
|---|---|
| Date | 2018-01-10 09:47 -0800 |
| Message-ID | <566f75c8-13cc-464d-ba48-5c8623db6c50@googlegroups.com> |
| In reply to | #34561 |
Den onsdag 10 januari 2018 kl. 17:41:08 UTC+1 skrev Jonas Thörnvall:
> Den onsdag 10 januari 2018 kl. 17:40:43 UTC+1 skrev Jonas Thörnvall:
> > Den onsdag 10 januari 2018 kl. 17:37:45 UTC+1 skrev Jonas Thörnvall:
> > > Den onsdag 10 januari 2018 kl. 17:25:07 UTC+1 skrev Jonas Thörnvall:
> > > > Den onsdag 10 januari 2018 kl. 06:42:22 UTC+1 skrev Jonas Thörnvall:
> > > > > Den onsdag 10 januari 2018 kl. 04:54:12 UTC+1 skrev Chris M. Thomasson:
> > > > > > On 1/9/2018 6:48 AM, Jonas Thörnvall wrote:
> > > > > > > I am pretty clueless how about how ***they*** program midi those programmers, but i built a track sequenser and now i realise that the thingys stored at the tracks need to be sorted on time basis. So it seem that track is mostly an editing feature?
> > > > > > >
> > > > > > > Thingys are read using timebasis. Since track zero not used i was thinking downmixing the channels to it.
> > > > > > >
> > > > > > > Can some of the more anal geniuses show me howto todo it in an elegant way. Or are you to buissy pondering over linguistic and semantic excersizes?
> > > > > > >
> > > > > > > I suspect i have to do it ***yet again*** myself.
> > > > > > > Well evidently track isn't of any use in the downmix.
> > > > > > > I have started to ponder if track really necessary, but it seem like a good idea to have when building an event editor. Also this allow instrument changes on same channel and even changing outmodule even when in track.
> > > > > > >
> > > > > > > That the midi API have omni listening on midiports is clear, i do not know if it can have multiple outports open.
> > > > > > >
> > > > > > > track[m] ={
> > > > > > > outport:[],
> > > > > > > portname : [],
> > > > > > > midichannel:[],
> > > > > > > program:[],
> > > > > > > time:[],
> > > > > > > data0:[],
> > > > > > > data1:[],
> > > > > > > data2:[]
> > > > > > > };
> > > > > > >
> > > > > >
> > > > > > https://youtu.be/kEBW8A3bw-Q
> > > > > >
> > > > > > ;^)
> > > > >
> > > > > Well maybe a good idea but i fear a modplayer is a much more complex ***thingy*** then something that deals with pure midisignals. You need a sound generator and god knows what to quirk out sounds, because it ain't just pure samples and midi in mods? They bend and pitch samples, then it would be better to go for a real sampler. I once invented ***the*** algorithm for none shortened/elongated piched sampleplayback i ***stretched*** the samples.
> > > > >
> > > > > Well i just interpolated the bits in between in an rather ugly manner.
> > > > > Kind of a bitwig you know.
> > > >
> > > > It was almost 20 years ago, and my memory is a bit rusty but basicly i used nykvist theorem to resample into the different keys i think it was the standard procedure and then i took the new pitched sample compared it with the ground keylength and got a ratio lets say 3,4 times shorter then i copied each bit using some statistic overlay 3,4 and pushed between.
> > > >
> > > > And the strange thing? It worked, try it yourself. Well a single note, i don't remember which was the base note used by early sampler and pcm sounds. Do not sound perfect, but if you record/sample a tone in each octave it sounds good, those days 32MB ram, so the bitwig of samples became a memory issue. But i think they solved it by reading the sampled notes directly from disc realtime but it must caused a small latency?
> > > >
> > > > Today i think you could do the resampling of a single sample into all notes and hold them within memory, even using javascript "because of the ton of memory" in modern computers. It will take a couple of seconds max to do the realtime key resampling?
> > > >
> > > > Well i think Javascript is amazing in many ways, but you have started to lock up things into blip blop semantics, that is basicly unreadable without a manual.
> > > >
> > > > I still trying to findout how the fuck to get the ports "promise" to load before the interface. If you would not be so fucking anal about the semantics it would be a no brainer. Now i have to reload the thing to get an error free load of the midi ports. I mean how can one put complexity in syntax of such a thing as the thing to wait for another task first to be done, before you start next?
> > > >
> > > > Yeah i get that i must wait for the fucking ports to be ready before the interface can try load the values from them. But i don't get how fucking waiting for an answer of a task can be so fucking complex that i am clueless about how to check if the ports loaded, before i try to call the values within them.
> > > >
> > > > How is it possible to fuck up things so bad?
> > >
> > > Apparently javascript have gone from having a rather straightforward syntax, into the world of mystery. I thought javascript and script languages was created to get away from awkvard convoluted syntax.
> > >
> > > And now the "idiot industry" slowly take over the project, and move it into the land of obscurity, it is rather sad that it moved towards that one have memorise stringed together piece of semantic nonsense bullshit, to be usable.
> > > I think there must be more people then i that have noticed it.
> > >
> > > https://stackoverflow.com/questions/27759593/how-do-i-wait-for-a-promise-to-finish-before-returning-the-variable-of-a-functio
> >
> > https://daveceddia.com/waiting-for-promises-in-a-loop/
> https://github.com/petkaantonov/bluebird/issues/31
How can i make sure that main() is executed after success?
I just can't figure that out.
if (navigator.requestMIDIAccess) {
navigator.requestMIDIAccess()
.then(success, failure);
}
function failure () {
console.error('No access to your midi devices.'+ + msg )
}
function success (midi) {
mid=midi;
inputs = midi.inputs.values();
outputs = midi.outputs.values();
// inputs outputs are Iterators
for (output = outputs.next(); output && !output.done; output = outputs.next()) {
var deviceOut = output.value.name;
console.log(deviceOut);
var optout = document.createElement("option");
optout.text = deviceOut;
document.getElementById("out_portsel").add(optout);
}
for (input = inputs.next(); input && !input.done; input = inputs.next()) {
var deviceIn = input.value.name;
var optin = document.createElement("option");
optin.text = deviceIn;
document.getElementById("in_portsel").add(optin);
// each time there is a midi message call the onMIDIMessage function
input.value.onmidimessage = onMIDIMessage;
}
}
function main(){
Rstarttime=performance.now();
document.getElementById("out_portsel").selectedIndex = outportindex;
makeTrack();
setTrack();
listTrackData();
changeProgram();
}
[toc] | [prev] | [standalone]
Back to top | Article view | comp.lang.javascript
csiph-web