Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

instruments #9

Closed
AmirMz1 opened this issue Feb 25, 2023 · 3 comments
Closed

instruments #9

AmirMz1 opened this issue Feb 25, 2023 · 3 comments

Comments

@AmirMz1
Copy link

AmirMz1 commented Feb 25, 2023

Hi, thanks for this amazing repository, I am converting this project to python code...
And I want to know that the folder "https://github.com/jacbz/Lofi/tree/main/client/assets/samples/instruments" has full instruments and the music is made only on these instruments?

@jacbz
Copy link
Owner

jacbz commented Feb 25, 2023

Hi, I'm not sure what you mean by "full instrument". The folder you linked contains instrument samples. Since this is a web app, we "cheat" and do not have a sample for every note, but rather samples for every major third, which reduces the number of samples and hence makes the site faster to load. The Tone.js library uses pitch correction to fill in the remaining notes. This reduces the audio quality somewhat, but since the sound is meant to be "lo-fi", there is no issue with that. If you implement an offline Python project though, you can of course add a sample for every note.

@AmirMz1
Copy link
Author

AmirMz1 commented Feb 26, 2023

Hi, thank you for your answer. I'm loading all notes from mido library in python but the sound of each note has a little different and I need to add some effects and filters from another library

@jacbz you said :
"The Tone.js library uses pitch correction to fill in the remaining notes" Do you mean that this library changes the notes and turns them into the notes that are in the instruments folder? Or add the notes from another link...

@jacbz
Copy link
Owner

jacbz commented Feb 26, 2023

The library only loads the notes that are provided, such as A, C, D#, and F# across 5 octaves in the piano folder. If you wish to play a C note, for example, the library will play the corresponding provided sound. However, if you intend to play a C# note, there is no provided sound available. In such cases, the Tone.js Sampler will use the C sound and adjust its pitch to sound like a C#.

@AmirMz1 AmirMz1 closed this as completed Feb 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants