# Severalthingatthesametime but without using millis

Hi, I am at the moment trying to make musical Floopydrives as my final project in high school. I would like to have 4 floopydrives all playing different melodies at the same time. I have googled alot on this topic and nothing seems to explain how to do many things at the same time except the famous post about using millis. The problem however is that making an entire meolody where milliseconds is crucial and have 4 different very long strings of codes makes it almost impossible to use millis. I cant just make a clock and have the floopy drives do something at a certain interval. I just simply want 4 different functions to all do their thing at the same time without having to wait for the previous function to finish.

The problem however is that making an entire meolody where milliseconds is crucial and have 4 different very long strings of codes makes it almost impossible to use millis.

Rubbish, no it doesn't.

I cant just make a clock and have the floopy drives do something at a certain interval

Yes you can.

I just simply want 4 different functions to all do their thing at the same time

To do that you will need a processor with at least four cores. So that rules out an Arduino then.

without having to wait for the previous function to finish.

You don't need that you just need to learn how to program correctly.

It's unclear to me why you claim millis can t be used - I suspect you are missing something, but without more details about your code and thought process, I couldn't say whay

if (millis() - NOW ) >= 1 microsecond
counter ++
NOW = millis()

if counter >= 10 play a D on floppy1
if counter >= 12 stop playing the D on floppy1
if counter >= 11 play an F on floppy2

you got some work to use this sort of logic,
I am thinking you are still thinking about DELAY() and that you cannot do anything else while it is running.

once you get the concept, it will be easier.

also, there are lots of people who have done this sort of thing, you should look at their code.

Here's an example of 8 things running at one time to make a 13 note organ (only tested with 8, that was all the buttons I had). I used micros() instead of millis() for better frequency control.
You could adapt this to make each output control a floppy drive vibration, vs analog mixing them to feed a computer speaker like I did.