Posts

Learning from chiptune masterpieces #1

This is supplementary article for this video: https://youtu.be/Dk9rC6x2kNc Read about the basics of nagen here: https://thecatnose.blogspot.com/2023/10/nagen-v1.html Wrecking Crew track 3 sounds: Kick: size 60 frame 0  4000 2 0 0 0  4001 1 0 0 3  4002 0xFC  4003 1 1 Hat 1: size 30 frame 0  400c 0 0 0  400e 0 1  400f 0x11 Hat 2: size 30 frame 0  400c 0 0 2  400e 0 2  400f 8 Snare: size 30 frame 0  400c 0 0 0  400e 0 0xA  400f 0x18 Bass: size 60 frame 0  4008 0 0x3C  400a 0xFC  400b 1 1 Lead: size 30 frame 0  4004 2 0 0 0  4005 0 7 1 7  4006 0x1C  4007 1 1

nagen v1

This is first public release of my online N ES A udio Gen erator (nagen), supplementary tool for my educational videos. You can use this rather low level tool to generate wav files from NES audio description. Go ahead and try it here: nagen v1  How to generate audio file Enter file name, such as "noise" Enter sound description (example is below) Click on "Generate wav file" button.  Example of audio description: size 30 frame 0  400c 1 1 0xA  400e = 0xFA  400f = 34  At this point nagen page should look like this: What to do with generated audio Click on file name (such as "noise.wav") to play it Click on download button (arrow pointing down) to download it  Audio description To set audio length in frames use size keyword (1 frame is 1/60 of second, hence 30 frames is half a second, 60 is one second), maximum is 10800 frames (3 minutes) To set frame number use frame keyword, then... ... write to NES registers using one of the following options: regis...

Полезности современной версии C++

Image
Modern C++ - это в моём понимании всё, что начинается со стандарта C++11. Которому уже, внезапно, аж 9 лет. И вот недавно я решил освежить свои знания этого замечательного ЯП, для чего нашёл и собрал в кучу все интересные лично для меня особенности С++11, C++14 и C++17. Результатом является эта памятка, которая нужна прежде всего именно мне самому для систематизации знаний и в качестве небольшого справочника. Начнём с нововведений C++11. 1. https://en.cppreference.com/w/cpp/language/static_assert Начиная с C++11 имеется возможность использовать static_assert (а в C++17 этот механизм упрощён) для проверок на этапе компиляции. А достаточно “умные” среды разработки (например, Visual Studio 2019) делают такие проверки и на этапе редактирования исходного кода. 2. https://en.cppreference.com/w/cpp/language/auto С помощью автоматического выведения типа можно существенно упростить, например, циклический перебор элементов контейнеров: 3. https://en.cppreference.com/w/cpp/language/function#Delet...

Useful things of modern C++

Image
Modern C++ is (in my understanding) everything that starts with the C++11 standard. Which is already 9 years old. And just recently I decided to brush up on my knowledge of this wonderful PL, for which I found and collected all the features of C++11, C++14 and C++17 that are interesting for me personally. The result is this memo, which is needed primarily for me to systematize knowledge and as a small reference book. Let's start with what's new in C++11. 1. https://en.cppreference.com/w/cpp/language/static_assert Since C++11 it is possible to use static_assert (and in C++17 this mechanism is simplified) for compile-time checks. And rather “smart” development environments (for example, Visual Studio 2019) do such checks at the stage of editing the source code. 2. https://en.cppreference.com/w/cpp/language/auto Automatic type deduction greatly simplifying, for example, looping through STL containers: 3. https://en.cppreference.com/w/cpp/language/function#Deleted_functions You can...