Ask Your Question

does exist a sound function in Libre Office Calc just like in Basic language

asked 2020-07-14 19:50:01 +0200

Jose R gravatar image

updated 2020-07-14 22:15:30 +0200

I need to simulate the sound reproduction of a programmable oscillator built with an LM555P timer having the output thru the PC speaker according to the formula F=1.44/(Ra + 2Rb)/C.

edit retag flag offensive close merge delete


What Basic language function? Perhaps you mean the .NET Console.Beep method.

Jim K gravatar imageJim K ( 2020-07-15 19:47:17 +0200 )edit

1 Answer

Sort by » oldest newest most voted

answered 2020-07-15 19:44:08 +0200

Jim K gravatar image

updated 2020-07-15 20:24:25 +0200

In LibreOffice Basic, the following worked for me on Windows. From

Private Declare Function Beep Lib "kernel32" (ByVal dwFreq As Long, ByVal dwDuration As Long) As Long
Sub press
    freq = 500
    duration = 10
    Call Beep(freq, duration)
End Sub

If this doesn't work, try a Python macro on Windows. Create and run it with APSO.

import winsound
winsound.Beep(frequency=1000, duration=500)

On Linux, a package must be installed. Then do a system call. The code for both Basic and Python is below.

sudo apt-get install beep

Shell("beep -f 1000 -n -f 2000 -n -f 1500 ")

os.system('beep -f %s -l %s' % (frequency,duration))
edit flag offensive delete link more
Login/Signup to Answer

Question Tools

1 follower


Asked: 2020-07-14 19:50:01 +0200

Seen: 45 times

Last updated: Jul 15