Example

PLAY_ demo

6

SP4CEBAR 2022-11-04 15:47 (Edited)

My PLAY_(V,N) subprogram is like NX "PLAY" but accepts any number for the note (N), so you could use notes like 50.5, -10, 100

note: notes above 96.62 have a frequency that's too high for NX to handle

SUB PLAY_(V,N)
  A=$FF40+12*V
  POKEW A,16*16.35*2^((N-1)/12)
  POKE A+2,PEEK(A+2) OR %11000000
END SUB

While making this I wrote the TOUCH_CELL(B,X,Y) function
Which uses sprites to figure out what BG and what cell have been touched

Also, the piano is generated (SUB PIANO), and so are the notes (SUB KEYSKIP)

PLAY 2 Demo.nx | Open in app
2022-11-04 15:47

Log in to reply.