You are reading a single comment by @allObjects and its replies. Click here to read the full conversation.
  • ...no problem with your suggestion... that would have been one of my approaches, but I did not want to deviate too much from the givens in the Web site referenced in Espruino's doc. The notation there there is easy to read, gives nice visual feed back about pacing - like good sheets do too by equidistant bars - and is easy to interpret by a machine.

    If we want to take it seriously, we would even have to account for the time the processor does 'switching'...

    On a totally 'non-musical' occasion - running continuously a stepper motor controlled by Espruino over some time - I notice irregularities in timing behavior, just by listening to the sound (noise). Each step took about 2ms, so it was about 500 Hz - with a very tight, interval driven loop (in this conversation, but driving a bit a larger bipolar OKI OL840 laser printer main stepper). It could have been some internal house keeping that made the (less prioritized) interval stutter. I hope it was not the something in the internal time keeping (that - temporary pitch change - should be not noticeable by human ear).

    In order to keep the tempo, it would not be sufficient to just make one call ofter the other... the durations would have to be calculated ever so often to stay in the beat.

    Now thinking about legato, normal accentuation, and staccato - a quite more elaborate approach is required, not just for timing, but also for intensity: 2 analog output pins would have to drive an external driver. The first pin would define the amplitude (or volume), the second the frequency... To not notice the first one and not create a audio-moire, it would have to be at a very high frequency. Would be a nice experiment... and I'm interested how such a simple driver(/mixer?) could look like...

    Btw, @alexanderbrevig, could you publish some audio clips in the IoT experimentation, midi pipe organ pedals and summer conversation?

About

Avatar for allObjects @allObjects started