Tuesday, October 4, 2016

Music macros in Open Office Basic

Here is a simple macro that generates the tone frequencies from C0 on up. Te range goes from C1 ti B12, I think. So, given how simple it is to use Open Office  basic macros, for music, we should be able to play the tones. Hence my sound project.  Whaty am I addinh? Staccato, to be applied at note termination.  Diminish works, keeps chords from clipping.  And tone can be optionally phase aligned to the beat.  I can add all the music symbols to the spreadsheet, and make them play.

CONST stepRatio = 1.05946
CONST lowNote = 32.7
CONST scale = "c d ef g a bc"  ' Note spacing according to C major scale



Function GetNamedNote(x as String) as Single
Dim s1 as String
Dim s2 as String
Dim exp as Integer
s1 = Lcase(Mid (x,1, 1))
 i =0
do
i = i +1
s2 = Mid (scale,i, 1)
loop while s1 <> s2 and i < 11

s2 = Mid (x,2, 1)
j = val(s2)
exp = (i-1) + (j-1)*12
GetNamedNote = lowNote * stepRatio^(exp)
end Function

1 comment:

David Kenny said...


The best ringtone for your cell phone in 2018.
Hello friends.
Today I will mention you the best quality ringtones for everyone's cell phone. Ringtone for iphone7 iPhone8 Ringtone Iphone. Ringtones from famous songs. Ringtones are loved by most people. You can install and search for other ringtones at my homepage:https://ringtonesmobile.net/

Here are examples of ringtones that I give you for reference and installation and then leave a comment for us:
- bollywood ringtones
- Guru Randhawa – Made In India ringtones
- Prada – Jass Manak ringtones
- Khalnayak Theme ringtones
- Shivba Malhari ringtones
Your comments will help us improve the ringtone better and bring new insights into the world of ringtones. thanks for your care