Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.javascript > #40567
| Path | csiph.com!newsfeed.xs4all.nl!newsfeed9.news.xs4all.nl!2.eu.feeder.erje.net!3.eu.feeder.erje.net!feeder.erje.net!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail |
|---|---|
| From | Julio Di Egidio <julio@diegidio.name> |
| Newsgroups | comp.lang.javascript |
| Subject | Re: making MIDI -- foot in mouth? |
| Date | Sun, 28 Nov 2021 12:21:48 +0100 |
| Organization | A noiseless patient Spider |
| Lines | 40 |
| Message-ID | <snvood$f2n$1@dont-email.me> (permalink) |
| References | <c0a4ba01-31b5-4486-9164-c3d791a8e277n@googlegroups.com> <5e200a12-0458-475f-912f-a9fc3f5c9427n@googlegroups.com> |
| Mime-Version | 1.0 |
| Content-Type | text/plain; charset=UTF-8; format=flowed |
| Content-Transfer-Encoding | 7bit |
| Injection-Date | Sun, 28 Nov 2021 11:21:49 -0000 (UTC) |
| Injection-Info | reader02.eternal-september.org; posting-host="c1e79da9c5520613781c77260c9ba336"; logging-data="15447"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+yf4GC4RsALAcZ5pOIkuWX7e13ra+IsUM=" |
| User-Agent | Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.3.2 |
| Cancel-Lock | sha1:cCpM1ouKPU8+zaUU5pYLdEofrwY= |
| In-Reply-To | <5e200a12-0458-475f-912f-a9fc3f5c9427n@googlegroups.com> |
| Content-Language | en-GB |
| Xref | csiph.com comp.lang.javascript:40567 |
Show key headers only | View raw
On 28/11/2021 04:59, luserdroog wrote: > On Saturday, November 27, 2021 at 5:12:02 PM UTC-6, luserdroog wrote: >> I've been making grandiose comments and hyperboles about >> structure and abstraction and whatnot without putting up a lot >> code. And admittedly, I'm not super experienced in javascript >> per se compared to most of the regs here. FYI, encapsulating logic in functions and, along the same line, avoiding shared state to the full extent possible, while already way better than anything Jonas keeps writing, still falls short of any actual code structuring proper (and, all the more so of any actual and explicitly functional use of JS). Indeed, code structuring, as the bottom line of software design, is not per se primarily nor immediately a matter of the specific language. That said, maybe keep also in mind that you are hardly going to see or do any significant structuring of code unless you get and go beyond the 500 (maybe even the 1000, YMMV) lines of code. > Well, dang. Foot indeed in mouth. A Midi file doesn't help you with > the Web Midi API. Unless I have missed it, you have yet to say what requirement you are trying to implement exactly. Building a midi file in memory to simply play it in the browser? What's difficult with that? Or rather playing midi? If it is playing midi, I think the approach has to be the exact opposite that you guys have shown so far: it's not the notes that should drive the loop, it's time itself (your metronome) that should tick at a certain frequency, call it your "resolution frequency" (in practice, ticking the 32nds or the 64ths, depending on how precise vs fast you manage to make it), then at certain ticks, i.e. as and when needed, you would send out midi events. And the first iteration would be building such "metronome" and its loop and making it tick with enough accuracy and not accumulating drift (a least within some reasonable range of metronomic speeds, aka BPMs)... Julio
Back to comp.lang.javascript | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
making MIDI -- foot in mouth? luserdroog <luser.droog@gmail.com> - 2021-11-27 15:11 -0800
Re: making MIDI -- foot in mouth? luserdroog <luser.droog@gmail.com> - 2021-11-27 19:59 -0800
Re: making MIDI -- foot in mouth? Julio Di Egidio <julio@diegidio.name> - 2021-11-28 12:21 +0100
Re: making MIDI -- foot in mouth? Jonas Thörnvall <jonas.thornvall@gmail.com> - 2021-11-28 04:00 -0800
Re: making MIDI -- foot in mouth? Julio Di Egidio <julio@diegidio.name> - 2021-11-28 04:08 -0800
Re: making MIDI -- foot in mouth? Jonas Thörnvall <jonas.thornvall@gmail.com> - 2021-11-28 08:29 -0800
Re: making MIDI -- foot in mouth? Jonas Thörnvall <jonas.thornvall@gmail.com> - 2021-11-28 08:40 -0800
Re: making MIDI -- foot in mouth? Jonas Thörnvall <jonas.thornvall@gmail.com> - 2021-11-28 08:57 -0800
Re: making MIDI -- foot in mouth? Jonas Thörnvall <jonas.thornvall@gmail.com> - 2021-11-28 09:03 -0800
Re: making MIDI -- foot in mouth? Jonas Thörnvall <jonas.thornvall@gmail.com> - 2021-11-28 08:35 -0800
Re: making MIDI -- foot in mouth? luserdroog <luser.droog@gmail.com> - 2021-11-29 21:53 -0800
Re: making MIDI -- foot in mouth? Julio Di Egidio <julio@diegidio.name> - 2021-11-30 23:54 -0800
Re: making MIDI -- foot in mouth? luserdroog <luser.droog@gmail.com> - 2021-12-02 21:16 -0800
Re: making MIDI -- foot in mouth? luserdroog <luser.droog@gmail.com> - 2021-11-29 23:33 -0800
Re: making MIDI -- foot in mouth? Jonas Thörnvall <jonas.thornvall@gmail.com> - 2021-11-30 00:46 -0800
Re: making MIDI -- foot in mouth? Jonas Thörnvall <jonas.thornvall@gmail.com> - 2021-11-30 00:56 -0800
Re: making MIDI -- foot in mouth? Jonas Thörnvall <jonas.thornvall@gmail.com> - 2021-11-30 01:00 -0800
Re: making MIDI -- foot in mouth? Jonas Thörnvall <jonas.thornvall@gmail.com> - 2021-11-30 01:15 -0800
Re: making MIDI -- foot in mouth? Jonas Thörnvall <jonas.thornvall@gmail.com> - 2021-11-30 01:19 -0800
csiph-web