Code Monkey home page Code Monkey logo

nbswave's Introduction

Hello, I'm Bentroen!โœจ

  • Maintainer of Open Note Block Studio, a music-making app aimed at creating note block music for Minecraft.
  • Pursuing a data analytics internship at the Federal Court of Accounts (TCU) at Rio de Janeiro, working with PowerBI, SQL, Python and R.
  • Member of Project OMA, a research project aimed at creating tools to support Orientation & Mobility teaching for blind and visually-impaired people, combining virtual reality and data analytics.
  • Currently studying Computer Science and full-stack web development.
  • I have a YouTube channel where I post note block covers and gameplays.
  • I love tech, gaming, video editing, playing the piano, making music, and pets! Oh, and I'm fascinated by space. (Yes I have lots of hobbies! ๐Ÿ˜…)

๐Ÿ”ง Skills

...with more to come!

๐Ÿ’ฌ Social

๐Ÿ“Š Stats

nbswave's People

Contributors

bentroen avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

nbswave's Issues

statically typed Dict problem; and 'int' object has no attribute 'name'

Hi! This will a much needed improvement for OpenNBS, and also I'm quite excited, as the solution I had bugged me quite a bit
so I've been doing synthesia videos of Minecraft noteblock songs on my youtube channel, and my previous solution was to render the song with fluidsynth and a custom soundfont, however that had quite a lot of drawbacks (especially with more than one of the same note playing)
its pretty cool that there will be this tool that I can automate
I may also try contributing some stuff to gain some experience in that

os: Ubuntu 20.04
python version: 3.8.10
numpy (1.20.1) (this is lower than in the pyproject.toml file :/ )
pydub (0.25.1)
pynbs (0.4.2)

1.

So I had a few errors while trying to get it working, first it said:

File ".../nbs-audio-main/nbsaudio/audio.py", line 139, in Track
    tags: Optional[dict[str, str]] = None,
TypeError: 'type' object is not subscriptable

this is the first time I see static typing in Python so I don't know exactly whats going on, but with
from typing import Optional, Dict importing Dict and changing all the dict to Dict fixed the problem
if this is the right solution, I'd gladly open a pull request with it!

2.

then I got an error in the test thing but that may be because I dont know how to setup the environment,

File "./test.py", line 15, in <module>
    os.environ["USERPROFILE"], "Minecraft Note Block Studio", "Data", "Sounds"
  File "/usr/lib/python3.8/os.py", line 675, in __getitem__
    raise KeyError(key) from None
KeyError: 'USERPROFILE'

anyway thats also installation dependent, so I just hardcoded the sounds path for testing purposes

3.

so when trying to render the test.nbs file, I got an error that something's not right with the instruments (though I indeed didn't provide any custom instruments, custom_sounds_path was just the absolute path of the normal sounds folder):

Sound file for instrument fizz.ogg couldn't be found; skipping
Sound file for instrument Villager_idle3.ogg couldn't be found; skipping
Sound file for instrument wood_click.ogg couldn't be found; skipping
Sound file for instrument entity.firework.blast_far.ogg couldn't be found; skipping
Sound file for instrument Wither_death.ogg couldn't be found; skipping
Sound file for instrument Villager_accept1.ogg couldn't be found; skipping
Sound file for instrument Custom instrument #7 wasn't assigned; skipping
Traceback (most recent call last):
  File ".../nbs-audio-main/nbsaudio/main.py", line 153, in _mix
    sound1 = self._instruments[note.instrument]
KeyError: 16

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "./test.py", line 23, in <module>
    render_audio(song, output, custom_sound_path=custom_sound_path, format="mp3")
  File ".../nbs-audio-main/nbsaudio/main.py", line 222, in render_audio
    renderer.mix_song().save(
  File ".../nbs-audio-main/nbsaudio/main.py", line 194, in mix_song
    return self._mix(self._song.sorted_notes())
  File ".../nbs-audio-main/nbsaudio/main.py", line 157, in _mix
    f"The sound file for instrument f{ins.name} was not found: f{ins.file}"
AttributeError: 'int' object has no attribute 'name'

well idk about this one, but trying one of my nbs files it actually worked so pretty cool :D

Export fails with "list index out of range"

This line tries to read the layer that a note is contained within:

layer = self.layers[note.layer]

If this layer doesn't exist in the file - because it's empty and doesn't need to be saved -, the export will fail with "list index out of range". This is a screenshot from Note Block Studio 3.10.0, which embeds nbswave 0.3.0:
image

This is not an issue most of the time because, as an implementation detail, Note Block Studio saves all loaded layers to the file, even if they are empty - incidentally, this means that every note block in the song is guaranteed to have a layer associated with it. However, as this is not required in the NBS specification, files saved with third-party tools may not have a layer entry for every layer with a note block, yet still load correctly in NBS.

A safeguard should be added when doing index checks so that the volume and panning attributes default to those of an empty layer.
NOTE: This is likely possible to happen in other indexed lookups as well, such as the note's instrument.

Custom instruments using a different pitch aren't actually pitched in the export

The instruments using a different starting pitch (going to Instrument Settings in ONBS and changing the Pitch column) doesn't actually change the pitch in the final export.

I'm not actually sure if the issue resides within this program or Note Block Studio, because I think the Pitch column is actually bugged and reversed in the editor (for example, having an instrument with it's default sound sounding like a D#4 should actually be set to A4 in order to be accurate). I might be wrong, though.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.