2

I plan to do a music notation which allow the user to place the note where ever they want and allowed them to play the notes they placed.

If the user put the note in the same time which we have to play 2 or above notes together, any solution to solve that problem?

Matthieu Brucher
  • 21,634
  • 7
  • 38
  • 62
Jun Ming
  • 21
  • 3

3 Answers3

0

Answer is really simple and straightforward in theory - use threads. Your code has to be executed asynchronously.

PatNowak
  • 5,721
  • 1
  • 25
  • 31
  • I have the same issue as Jun Ming, however, using threads does NOT work, as I have tested. Any other solutions? Thanks. If you need my code, I can provide it, but I can confirm I have done everything right. – Anony Mous Apr 02 '22 at 10:42
0

Use multiprocess and winsound module to do so.

L_Pav
  • 281
  • 1
  • 3
  • 11
  • if I have: winsound.Beep(261,999) #C notes winsound.Beep(293,999) # D notes .How can i play it together with multiprocess – Jun Ming Jan 25 '16 at 15:07
0
import threading
....
....
....
threading.Thread(name='<thread_name>', target='<your_target>').start()

you can do it 2 times for 2 different targets

Meysam
  • 596
  • 6
  • 12
  • as I said to PatNowak I have the same issue as Jun Ming, however, using threads does NOT work, as I have tested. Any other solutions? Thanks. – Anony Mous Apr 02 '22 at 10:43