All good. Every problem is difficult, until it's not :laugh: .
Dougy83
Posts
-
How did they do it? -
How did they do it?The class code is here: honey code - My Paste Text[^]
-
How did they do it?From whichever tracks have the next time equal to the minimum-next-time of all tracks:
void playNextNotes()
{
int nextTime = MAX_INTVAL;
for (auto &track : tracks)
{
if (track.getNextTimestamp() < nextTime)
nextTime = track.getNextTimestamp();
}waitUntil(nextTime); for (auto &track : tracks) { if (track.getNextTimestamp() == nextTime) { auto event = track.getNextEvent(); midi.playEvent(event); } }
}
-
How did they do it?My last response is suspected of being spam, probably because it contains code, and programming questions are forboden in the lounge. Can you provide a link to your question in the programming section? The code is very simple.
-
How did they do it?I think you're overcomplicating things. You could use a simple class for each track. Initialise it with the track length, byte offset/state, and a getNextByte(offset/state) callback function. Implement getNextEventTime(), and getNextEvent(). Now you can get the minimum getNextEventTime() of all tracks, and then getNextEvent() for any track that matched that minimum time. Calling getNextEvent() will update that track's next event time. Rinse & repeat. Rinsing is optional.
-
Math(s) problem - puzzleI hadn't heard of PEDMAS before; I'm guessing it's some kind of Hollywood holiday.
-
Just dusted off my old maths booksJust get your friend's kid some boots and send him this tutorial: Quick-sort with Hungarian (Küküllőmenti legényes) folk dance - YouTube[^]
-
To the guy asking if we'd using COVID-19 tracking apps...Should you be alerted if you came into contact with someone that came into contact with a confirmed case, i.e. 2nd-hand contact (or even 3rd-hand contact)? If so, then all your close-encounter data needs to be harvested, which removes the veil of security in the original proposal.
-
Why do TAR files always need to be decompressed twice?.tgz and .tar.gz files are some file(s)/directory(ies) stored into a single tar (tape archive) file without compression, before being compressed using gzip. gzip (on its own) can only handle a single file. This is why it looks like it's compressed twice. I'm pretty sure if you specify the right arguments, you can decompress the .tgz with a single command.
-
My Theory on why Javascript is winninghave you seen the bridge.net C# -> JS converter? Looks pretty neat to me Bridge.NET - Open Source C# to JavaScript Compiler[^]
-
AVR Assembler articleMost of the Arduino boards use a processor with 32kB flash ('328, or '32), and all use C++ for 'wiring' code http://arduino.cc/en/Products.Compare[^]