function mysynth

global sliders

fig = figure

sliders = [ makeslider(20, 20, 's1')
            makeslider(40, 20, 's2')
            makeslider(60, 20, 's3')
            makeslider(80, 20, 's4')
            makeslider(100, 20, 's5') ]

buttons = [ makebutton('Do', 20, 180, '262') 
            makebutton('Do#', 50, 140, '277')
            makebutton('Re', 80, 180, '294')
            makebutton('Re#', 110, 140, '311')
            makebutton('Mi', 140, 180, '330')
            makebutton('Fa', 200, 180, '349')
            makebutton('Fa#', 230, 140, '370')
            makebutton('So', 260, 180, '392')
            makebutton('So#', 290, 140, '415')
            makebutton('La', 320, 180, '440')
            makebutton('La#', 350, 140, '466')
            makebutton('Ti', 380, 180, '494') ]


function h = makeslider(x, y, tag)

h = uicontrol('Style', 'slider', 'Position', [x, y, 10, 100], ...
              'Tag', tag)

function h = makebutton(text, x, y, f)

h = uicontrol('Style', 'pushbutton', 'Position', [x, y, 50, 30], ...
              'String', text, 'Callback', ['maketone2('  f  ')'])

