Posts: 357
Threads: 32
Joined: Apr 2022
Reputation:
90
As of 0.9.0 QBJS finally has the PLAY command available. Does anyone have any favorite programs that feature PLAY that would make good additions to the samples library? It would also be great to just have more test cases as I'm sure it is not 100% correct yet. I've mined the wiki for some good examples like the fun Music Grid below but would love to see more.
Posts: 4,692
Threads: 222
Joined: Apr 2022
Reputation:
322
01-17-2025, 12:25 AM
(This post was last modified: 01-17-2025, 12:26 AM by bplus.)
Fun! It is
724 855 599 923 575 468 400 206 147 564 878 823 652 556 bxor cross forever
Posts: 4,692
Threads: 222
Joined: Apr 2022
Reputation:
322
01-17-2025, 09:24 PM
(This post was last modified: 01-17-2025, 09:25 PM by bplus.)
I am wondering if there is a way to record and share our Play (referring to the demo of Play) with others to show what musical geniuses we are?
724 855 599 923 575 468 400 206 147 564 878 823 652 556 bxor cross forever
Posts: 357
Threads: 32
Joined: Apr 2022
Reputation:
90
Hrm, that’s weird. It smushed together two separate posts. I guess because I posted them one right after the other?
Posts: 4,692
Threads: 222
Joined: Apr 2022
Reputation:
322
01-18-2025, 08:13 PM
(This post was last modified: 01-18-2025, 08:19 PM by bplus.)
Hello
@dbox
I am testing the new Play demo with new Save and Load (very nice!) and notice a slight problem getting those mouse clicks caught!
maybe this requires, once again, another application of a _limit or a pause to get clear of a click.
Code: (Select All)
SUB domousestuff
DIM x, y
DO WHILE _MOUSEINPUT
IF _MOUSEBUTTON(1) THEN
x = FIX(_MOUSEX \ FIX(maxx \ 16))
y = FIX(_MOUSEY \ FIX(maxy \ 16))
grid(x, y) = 1 - grid(x, y)
END IF
LOOP
END SUB
see if this works better for you:
Code: (Select All)
Sub domousestuff
Dim x, y
While _MouseInput: Wend ' there we've polled the mouse we don't need to remain inside the loop unless we need mouse wheel
If _MouseButton(1) Then
_delay .25 ' wait for user to release button
x = Fix(_MouseX \ Fix(maxx \ 16))
y = Fix(_MouseY \ Fix(maxy \ 16))
grid(x, y) = 1 - grid(x, y)
End If
End Sub
I am not proud of _delay .25 a quick hacky way to pause for a bit to clear the mouse button but it is short and sweet because it gets the job done better IMO than the first mouse catcher routine.
724 855 599 923 575 468 400 206 147 564 878 823 652 556 bxor cross forever
Posts: 4,692
Threads: 222
Joined: Apr 2022
Reputation:
322
01-18-2025, 08:42 PM
(This post was last modified: 01-18-2025, 08:56 PM by bplus.)
Well Music Grid needs its own folder under my QBJS folder since we are adding files.
OK let's test sharing:
mgrid1.txt
will that work?
nope! The text file saved is loadable but the txt file won't make it through editors from copy/paste.
You all will have to wait to here today's master piece.
Actually you repeat something enough and almost anything starts to sound good, I think.
724 855 599 923 575 468 400 206 147 564 878 823 652 556 bxor cross forever