Skip to content
← Back to Community
New in Basic: Sound, high resolution, and clean syntax
Profile icon
h
has Hacker Plan
amasad

We're approaching 1.0 for Basic so I wanted to do a big final push before I lock the features and start focusing on fixes and performance enhancements.

In this release:

Sound

Now you can play sounds and music in Basic. There are two APIs, one that plays a note, and the other plays a frequency.

play "C#"
sound 400

The repl below implements a kind of piano using this API.

Refer to docs for more info.

Display

You can now increase the display resolution and even remove the pixel borders.

display 500, 500, false

The new display is implemented using Canvas which makes it much faster and smoother. You can even right click and save the resulting image.

Screen Shot 2020-05-18 at 12.35.06 AM

Thanks to @MrEconomical, @AmazingMech2418, @SpicedSpices, @AdCharity, and @turbio for help in this.

Cleaner syntax

Line numbers are now optional! You can leave them out and only use them when using gosub or goto. See the program below as an example.

The one last thing I want to do here is to add named labels so that, if you wish, you don't have to use line numbers at all.

Gimme bugs

Please report bugs or any issues you see. Try to especially do high resolution graphics stuff and let me know if it works well.

Voters
Profile icon
Rendangbike
Profile icon
programmeruser
Profile icon
zplusfour
Profile icon
HackermonDev
Profile icon
frissyn
Profile icon
Navinor
Profile icon
ShivankChhaya
Profile icon
studentAlfredAl
Profile icon
ChezCoder
Profile icon
Vandesm14
Comments
hotnewtop
Profile icon
[deleted]

meglovania in basic

Profile icon
frissyn

@roylatgnail my thoughts exactly 😂

Profile icon
NoelB33
im scared
Profile icon
amasad
Profile icon
AdCharity

:P

Profile icon
JordanDixon1

So is this the only thing that allows for audio on repl.it? Or could we add support for pygame/python? I was hoping I could play audio files on repl.it Python.

Profile icon
AllAwesome497

@JordanDixon1 You can! I have a post here detailing it.

Profile icon
TheForArkLD

Really????
This is cool!
and congrat you are 2200 cycles!
(and we need file manager for apl,qbasic,and some languages)

Profile icon
amasad

@TheForArkLD thank you! I kept the file manager out to keep the environment simple especially for newbies. What do you need it for?

Profile icon
TheForArkLD

@amasad for load files :)

Profile icon
amasad

@TheForArkLD yes makes sense. Basic right now has no modules but in the future I might add it.

Profile icon
TheForArkLD

@amasad Ok thanks :)
( When do you add DefLang to repl.it? )

Profile icon
AmazingMech2418

@amasad The main language that I know many people want a file system for is Python + Turtle. It seems like it doesn't currently support libraries for some reason which I find somewhat strange considering that Turtle is based on Tkinter and Tkinter repls have file systems and libraries, although Turtle repls don't.

Profile icon
TheForArkLD
Profile icon
masfrost

cool!

Profile icon
[deleted]

sound is so cool!
and a question...
is there is a Basic tutorial?

Profile icon
ChezCoder

sound doesnt work...

Profile icon
amasad

@ChezCoder how come. I just tried it. Can you send me a repl where you're trying it?

Profile icon
ChezCoder

@amasad i tried it in console. no sound coming out... :(

Profile icon
amasad

@ChezCoder i think i fixed it -- try now

Profile icon
ChezCoder

@amasad now the basic console is broken :(. The cursor is one line below the > thing and when I press enter, the > doesn't reappear unless I press ctrl + c - this is while the repl was running and I aborted it with ctrl + c. When I stopped the project with the stop button at the top of the repl, play and sound are both broken

Profile icon
Codemonkey51

Cool!

Profile icon
DynamicSquid

I like how you say

Gimme bugs

Profile icon
[deleted]

You made this language, Amjad?

Profile icon
amasad
Profile icon
[deleted]

@amasad wow!
Are you from jordan?
I am from plaestine!

Profile icon
amasad

@Zuhdi28 yes! My family is from Palestine originally. From Seelat AlDahr, which I think is close to Jeneen.

Where from Palestine are you?

Profile icon
[deleted]

@amasad yes! I know what Jeneen it is! I am from Kofor Qarea, i don't think you know it.