.. _moduleAudioSearch.transcriber:

music21.audioSearch.transcriber
===============================

.. WARNING: DO NOT EDIT THIS FILE: AUTOMATICALLY GENERATED. Edit the .py file directly

.. module:: music21.audioSearch.transcriber



.. function:: monophonicStreamFromFile(fileName, useScale=None)


    Reads in a .wav file and returns a stream representing the transcribed, monophonic audio.

    `fileName` should be the complete path to a file on the disk.

    a different scale besides the chromatic scale can be specified by setting `useScale`.
    See :ref:`moduleScale` for a list of allowable scales. (or a custom one can be given).
    Microtonal scales are totally accepted, as are retuned scales where A != 440hz.




    >>> from music21 import *
    >>> waveFile = 'test_audio.wav'
    >>> p = audioSearch.transcriber.monophonicStreamFromFile(waveFile)
    >>> p
    <music21.stream.Part ...>
    >>> p.show('text')
    {0.0} <music21.note.Note C>
    {0.25} <music21.note.Note C>
    {0.75} <music21.note.Note D>
    {1.75} <music21.note.Note E>
    {2.75} <music21.note.Note F>
    {3.75} <music21.note.Note G>
    {4.75} <music21.note.Note A>
    {5.75} <music21.note.Note B>
    {6.75} <music21.note.Note C>
    {7.25} <music21.note.Rest rest>
    {7.75} <music21.note.Note C>
    {8.25} <music21.note.Note C>
    {8.5} <music21.note.Note E>
    {9.5} <music21.note.Note G>
    {10.5} <music21.note.Note C>
    {11.0} <music21.note.Note C>
    {11.25} <music21.note.Note A>
    {12.25} <music21.note.Note F>
    {13.25} <music21.note.Note D>
    {15.25} <music21.note.Note D>
    {16.25} <music21.note.Rest rest>
    {17.25} <music21.note.Note G>



.. function:: runTranscribe(show=True, plot=True, useMic=True, seconds=20.0, useScale=None, saveFile=True)


    runs all the methods to record from audio for `seconds` length (default 10.0)
    and transcribe the resulting melody returning a music21.Score object

    if `show` is True, show the stream.

    if `plot` is True then a Tk graph of the frequencies will be displayed.

    if `useMic` is True then use the microphone.  If False it will load the file of `saveFile`
    or the default temp file to run transcriptions from.

    a different scale besides the chromatic scale can be specified by setting `useScale`.
    See :ref:`moduleScale` for a list of allowable scales. (or a custom one can be given).
    Microtonal scales are totally accepted, as are retuned scales where A != 440hz.

    if `saveFile` is False then then the recorded audio is saved to disk.  If
    set to `True` then `environLocal.getRootTempDir() + os.path.sep + 'ex.wav'` is
    used as the filename.  If set to anything else then it will use that as the
    filename.



