This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[tool.pyright] | |
typeCheckingMode = "standard" | |
[tool.mypy] | |
strict = false | |
ignore_missing_imports = true | |
[tool.ruff] | |
# Exclude a variety of commonly ignored directories. | |
exclude = [ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;;; ruff-sort-imports.el --- Sort import libraries of Python source via Ruff -*- lexical-binding: t; -*- | |
;; Copyright (C) 2024 Akira Tamamori | |
;; Copyright (C) 2023 Ville Skyttä | |
;; This program is free software; you can redistribute it and/or modify | |
;; it under the terms of the GNU General Public License as published by | |
;; the Free Software Foundation, either version 3 of the License, or | |
;; (at your option) any later version. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- coding: utf-8 -*- | |
"""Demonstration script of phase reconstruction with PHASRET and oct2py. | |
Copyright (C) 2024 by Akira TAMAMORI | |
Permission is hereby granted, free of charge, to any person obtaining a copy | |
of this software and associated documentation files (the "Software"), to deal | |
in the Software without restriction, including without limitation the rights | |
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
copies of the Software, and to permit persons to whom the Software is |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import numpy as np | |
import soundfile as sf | |
from oct2py import octave | |
from scipy import signal | |
WIN_LEN = 512 | |
HOP_LEN = 128 | |
FFT_LEN = 512 | |
WINDOW = "hann" | |
IN_WAV = "ONOMATOPEE300_001.wav" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- coding: utf-8 -*- | |
"""Wrapper modules of Gated Linear Unit (GLU). | |
Copyright (C) 2024 by Akira TAMAMORI | |
Permission is hereby granted, free of charge, to any person obtaining a copy | |
of this software and associated documentation files (the "Software"), to deal | |
in the Software without restriction, including without limitation the rights | |
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
copies of the Software, and to permit persons to whom the Software is |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
# MIT License | |
# Copyright (C) 2024 by Akira TAMAMORI | |
# Permission is hereby granted, free of charge, to any person | |
# obtaining a copy of this software and associated documentation files | |
# (the Software"), to deal in the Software without restriction, | |
# including without limitation the rights to use, copy, modify, merge, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;; 起動時間をメッセージバッファに表示 | |
(add-hook 'after-init-hook | |
(lambda () | |
(message "init time: %.3f sec" | |
(float-time (time-subtract after-init-time before-init-time))))) | |
;; ロードパスの設定 | |
(add-to-list 'load-path "~/.emacs.d/lisp/") | |
;; C-zを無効化 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;; C-zを無効化 | |
(global-unset-key "\C-z") | |
;; ロードパスを追加 | |
(add-to-list 'load-path "~/.emacs.d/lisp/") | |
;; theme | |
(if (display-graphic-p) | |
(load-theme 'solarized-light t)) | |
;; (load-theme 'solarized-light t) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"""Griffin-Lim algorithm. | |
Copyright (C) 2023 by Akira Tamamori | |
Permission is hereby granted, free of charge, to any person obtaining a copy | |
of this software and associated documentation files (the "Software"), to deal | |
in the Software without restriction, including without limitation the rights | |
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
copies of the Software, and to permit persons to whom the Software is | |
furnished to do so, subject to the following conditions: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- coding: utf-8 -*- | |
"""音声パワーと基本周波数をリアルタイムモニタリングする. | |
Copyright (C) 2023 by Akira TAMAMORI | |
Copyright (C) 2022 by Koji INOUE | |
Permission is hereby granted, free of charge, to any person obtaining a copy | |
of this software and associated documentation files (the "Software"), to deal | |
in the Software without restriction, including without limitation the rights | |
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell |
NewerOlder